package com.wdc.controller;

import com.wdc.domain.Wdc;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/books")
public class BookController {
    @Value("${lesson}")
    private String lesson;
    @Value("${server.port}")
    private String port;
    @Value("${enterprise.hobby[0]}")
    private String hobby_;

    @Autowired
    private Wdc wdc;

    @GetMapping("/{id}")
    public String getById(@PathVariable int id){
        System.out.println("hello,spring boot ==>"+id);
        System.out.println(lesson);
        System.out.println(port);
        System.out.println(hobby_);
        System.out.println("================");
        System.out.println(wdc);


        return "hell wdc";
    }
}
